package EventManager;

/** Abstract request class, the absolute top of the hierarchy.
 * 
 * @author Yury Kitaev
 *
 */
public abstract class Request 
{
	// Status. Refer to RequestStatus for enum details
	private RequestStatus status;

	public Request() 
	{
		super();
		this.status = RequestStatus.Pending;
	}
	
	/**
	 * Processes the request and updates itself.
	 */
	public abstract void process();
	
	/**
	 * Status of the request.
	 * @return Sustained if the request was approved, Refused if not, Pending if it is still under consideration by the system.
	 */
	public RequestStatus getStatus() 
	{
		return status;
	}

	/**
	 * Sets the status of the request.
	 * @param status Sustained if the request was approved, Refused if not, Pending if it is still under consideration by the system.
	 */
	public void setStatus(RequestStatus status) 
	{
		this.status = status;
	}

	@Override
	public String toString() 
	{
		return "Abstract Request [status=" + status + "]";
	}
	
	
}
